//
//  PublishViewController.m
//  MagicBox
//
//  Created by dllo on 16/8/13.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "PublishViewController.h"
#import "PictureViewController.h"
 

@interface PublishViewController ()
@property (nonatomic ,strong) UITextField *myText;
@property (nonatomic ,strong) PictureViewController *myVC;

@end

@implementation PublishViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    _myVC = [[PictureViewController alloc] init];
    [self addChildViewController:_myVC];
    self.view.frame = _myVC.view.frame;
    [self.view addSubview:_myVC.pictureCollectonView];
    
   
    
    
    
    
    self.myText = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, SCREENWIDTH, 100)];
    [self.view addSubview:self.myText];
    self.myText.backgroundColor = [UIColor lightGrayColor];
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"发表" style:UIBarButtonItemStylePlain target:self action:@selector(rightAction)];
    
    UITapGestureRecognizer *myRecognizer = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(keyboardHide:)];
    // 设置成NO表示当前控件响应后会传播到其他控件上, 默认为\(^o^)/YES!
     myRecognizer.cancelsTouchesInView = NO;
    // 将触摸事件添加到当前的view上
    [self.view addGestureRecognizer:myRecognizer];
    
}






- (void)rightAction {
    
    [self.navigationController popViewControllerAnimated:YES];
 
        
       
}




// 点击空白处键盘回收
- (void)keyboardHide:(UITapGestureRecognizer *)tap{
    [self.view endEditing:YES];
}
 




















@end
